package com.sky.business.sys.event;


import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

/**
 * 边缘中心下发给终端的开始跟踪事件
 */
@Data
@NoArgsConstructor
public class EdgeBeginTrackingEvent extends BaseEvent {
    /**
     * 元数据
     */
    private Metadata metadata;

    /**
     * 构造器
     * @param edgeId 边缘中心id
     * @param deviceId 设备id
     * @param taskId 任务id
     * @param objectData 对象数据
     * @param aiData ai数据
     * @param extention 扩展
     */
    public EdgeBeginTrackingEvent(String edgeId, String deviceId, String taskId, TrackObjectData objectData, AiData aiData, Map extention){
        super("BeginTracking",  edgeId);
        metadata = new Metadata();
        metadata.setDeviceId(deviceId);
        metadata.setTaskId(taskId);
        metadata.setObjectData(objectData);
        metadata.setAiData(aiData);
        metadata.setExtention(extention);
    }

    @Data
    public static class Metadata  extends DeviceMetadata{
        private String taskId;
        private TrackObjectData objectData;
        private AiData aiData;
        private Map extention;
    }

}
